<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>KindEditor</title>
<style>
textarea {
	display: block;
}
</style>
<script charset="utf-8" src="../kindeditor.js"></script>
<script>
			KE.show({
				id : 'content1'
			});
		</script>
</head>
<body>
<h3>调用编辑器的API</h3>
<textarea id="content1" name="content"
	style="width: 700px; height: 300px; visibility: hidden;">
<p><strong>月下独酌</strong> - 李白</p>
<p>花间一壶酒，独酌无相亲。</p>
<p>举杯邀明月，对影成三人。</p>
<p>月既不解饮，影徒随我身。</p>
<p>暂伴月将影，行乐须及春。</p>
<p>我歌月徘徊，我舞影零乱。</p>
<p>醒时同交欢，醉后各分散。</p>
<p>永结无情游，相期邈云汉。</p>
</textarea>
<br />
<input type="button" name="button" value="取得HTML"
	onclick="javascript:alert(KE.html('content1'));" />
<input type="button" name="button" value="判断是否为空"
	onclick="javascript:alert(KE.isEmpty('content1'));" />
<input type="button" name="button" value="取得文本"
	onclick="javascript:alert(KE.text('content1'));" />
<input type="button" name="button" value="取得文本(包含img,embed)"
	onclick="javascript:alert(KE.util.getPureData('content1'));" />
<input type="button" name="button" value="取得选中HTML"
	onclick="javascript:alert(KE.selectedHtml('content1'));" />
<br />
<br />
<input type="button" name="button" value="设置HTML"
	onclick="javascript:KE.html('content1', '<h3>Hello KindEditor</h3>');" />
<input type="button" name="button" value="设置文本"
	onclick="javascript:KE.text('content1', '<h3>Hello KindEditor</h3>');" />
<input type="button" name="button" value="插入HTML"
	onclick="javascript:KE.insertHtml('content1', '<strong>测试内容</strong>');" />
<input type="button" name="button" value="添加HTML"
	onclick="javascript:KE.appendHtml('content1', '<strong>Append HTML</strong>');" />
<input type="button" name="button" value="清空内容"
	onclick="javascript:KE.html('content1', '');" />
</body>
</html>
